// services/home.ts
/**
 * 首页-前台分类-小程序
 */
import type { PageParams, PageResult } from "@/types/global";
import type { BannerItem, CategoryItem, HotItem, GuessItem } from "@/types/home";
import { getAction } from "@/utils/http";
export const getHomeBannerApi = (distributionSite = 1)=>{
        // 即对应http.ts文件中定义的：返回的result是一个BannerItem类型的对象数组
        return getAction<BannerItem []>({
                url: '/home/banner',
                data: {
                        distributionSite
                }
        })
}
export const getHomeCategoryAPI = () => {
        return getAction<CategoryItem[]>({
          url: '/home/category/mutli',
        })
      }

// services/home.ts
/**
 * 首页-热门推荐-小程序
 */
export const getHomeHotAPI = () => {
        return getAction<HotItem[]>({
          url: '/home/hot/mutli',
        })
      }

// src/services/home.ts
/**
 * 猜你喜欢-小程序
 */
export const getHomeGoodsGuessLikeAPI = (data?: PageParams) => {
        return getAction<PageResult<GuessItem>>({
          url: '/home/goods/guessLike',
          data,
        })
      }

